Optimal. Leaf size=86 \[ -\frac {\tanh ^{-1}(x) \log \left (\frac {2}{1+x}\right )}{b}+\frac {\tanh ^{-1}(x) \log \left (\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{b}+\frac {\text {PolyLog}\left (2,1-\frac {2}{1+x}\right )}{2 b}-\frac {\text {PolyLog}\left (2,1-\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6057, 2449,
2352, 2497} \begin {gather*} -\frac {\text {Li}_2\left (1-\frac {2 (a+b x)}{(a+b) (x+1)}\right )}{2 b}+\frac {\tanh ^{-1}(x) \log \left (\frac {2 (a+b x)}{(x+1) (a+b)}\right )}{b}+\frac {\text {Li}_2\left (1-\frac {2}{x+1}\right )}{2 b}-\frac {\log \left (\frac {2}{x+1}\right ) \tanh ^{-1}(x)}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2352
Rule 2449
Rule 2497
Rule 6057
Rubi steps
\begin {align*} \int \frac {\tanh ^{-1}(x)}{a+b x} \, dx &=-\frac {\tanh ^{-1}(x) \log \left (\frac {2}{1+x}\right )}{b}+\frac {\tanh ^{-1}(x) \log \left (\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{b}+\frac {\int \frac {\log \left (\frac {2}{1+x}\right )}{1-x^2} \, dx}{b}-\frac {\int \frac {\log \left (\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{1-x^2} \, dx}{b}\\ &=-\frac {\tanh ^{-1}(x) \log \left (\frac {2}{1+x}\right )}{b}+\frac {\tanh ^{-1}(x) \log \left (\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{b}-\frac {\text {Li}_2\left (1-\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{2 b}+\frac {\text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+x}\right )}{b}\\ &=-\frac {\tanh ^{-1}(x) \log \left (\frac {2}{1+x}\right )}{b}+\frac {\tanh ^{-1}(x) \log \left (\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{b}+\frac {\text {Li}_2\left (1-\frac {2}{1+x}\right )}{2 b}-\frac {\text {Li}_2\left (1-\frac {2 (a+b x)}{(a+b) (1+x)}\right )}{2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.06, size = 260, normalized size = 3.02 \begin {gather*} \frac {-\pi ^2+4 \tanh ^{-1}\left (\frac {a}{b}\right )^2+4 i \pi \tanh ^{-1}(x)+8 \tanh ^{-1}\left (\frac {a}{b}\right ) \tanh ^{-1}(x)+8 \tanh ^{-1}(x)^2-4 i \pi \log \left (1+e^{2 \tanh ^{-1}(x)}\right )-8 \tanh ^{-1}(x) \log \left (1+e^{2 \tanh ^{-1}(x)}\right )+8 \tanh ^{-1}\left (\frac {a}{b}\right ) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )}\right )+8 \tanh ^{-1}(x) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )}\right )+4 i \pi \log \left (\frac {2}{\sqrt {1-x^2}}\right )+8 \tanh ^{-1}(x) \log \left (\frac {2}{\sqrt {1-x^2}}\right )+4 \tanh ^{-1}(x) \log \left (1-x^2\right )+8 \tanh ^{-1}(x) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )\right )-8 \tanh ^{-1}\left (\frac {a}{b}\right ) \log \left (2 i \sinh \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )\right )-8 \tanh ^{-1}(x) \log \left (2 i \sinh \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )\right )-4 \text {PolyLog}\left (2,-e^{2 \tanh ^{-1}(x)}\right )-4 \text {PolyLog}\left (2,e^{-2 \left (\tanh ^{-1}\left (\frac {a}{b}\right )+\tanh ^{-1}(x)\right )}\right )}{8 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.25, size = 106, normalized size = 1.23
method | result | size |
default | \(\frac {\ln \left (b x +a \right ) \arctanh \left (x \right )}{b}-\frac {-\frac {\left (\dilog \left (\frac {b x -b}{-a -b}\right )+\ln \left (b x +a \right ) \ln \left (\frac {b x -b}{-a -b}\right )\right ) b}{2}+\frac {\left (\dilog \left (\frac {b x +b}{b -a}\right )+\ln \left (b x +a \right ) \ln \left (\frac {b x +b}{b -a}\right )\right ) b}{2}}{b^{2}}\) | \(106\) |
risch | \(-\frac {\dilog \left (\frac {\left (1-x \right ) b -a -b}{-a -b}\right )}{2 b}-\frac {\ln \left (1-x \right ) \ln \left (\frac {\left (1-x \right ) b -a -b}{-a -b}\right )}{2 b}+\frac {\dilog \left (\frac {\left (1+x \right ) b +a -b}{a -b}\right )}{2 b}+\frac {\ln \left (1+x \right ) \ln \left (\frac {\left (1+x \right ) b +a -b}{a -b}\right )}{2 b}\) | \(120\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 119, normalized size = 1.38 \begin {gather*} -\frac {{\left (\log \left (x + 1\right ) - \log \left (x - 1\right )\right )} \log \left (b x + a\right )}{2 \, b} + \frac {\operatorname {artanh}\left (x\right ) \log \left (b x + a\right )}{b} - \frac {\log \left (x - 1\right ) \log \left (\frac {b x - b}{a + b} + 1\right ) + {\rm Li}_2\left (-\frac {b x - b}{a + b}\right )}{2 \, b} + \frac {\log \left (x + 1\right ) \log \left (\frac {b x + b}{a - b} + 1\right ) + {\rm Li}_2\left (-\frac {b x + b}{a - b}\right )}{2 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {atanh}{\left (x \right )}}{a + b x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\mathrm {atanh}\left (x\right )}{a+b\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________